MsgBox, "wait windows terminal open"
Process, Wait, WindowsTerminal.exe
NewPid := ErrorLevel
MsgBox, %NewPid%
Return